Integrand size = 21, antiderivative size = 54 \[ \int \frac {\cot ^2(c+d x)}{(a+a \sin (c+d x))^2} \, dx=\frac {2 \text {arctanh}(\cos (c+d x))}{a^2 d}-\frac {\cot (c+d x)}{a^2 d}-\frac {2 \cot (c+d x)}{a^2 d (1+\csc (c+d x))} \]
[Out]
Time = 0.07 (sec) , antiderivative size = 54, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {2788, 3855, 3852, 8, 3862} \[ \int \frac {\cot ^2(c+d x)}{(a+a \sin (c+d x))^2} \, dx=\frac {2 \text {arctanh}(\cos (c+d x))}{a^2 d}-\frac {\cot (c+d x)}{a^2 d}-\frac {2 \cot (c+d x)}{a^2 d (\csc (c+d x)+1)} \]
[In]
[Out]
Rule 8
Rule 2788
Rule 3852
Rule 3855
Rule 3862
Rubi steps \begin{align*} \text {integral}& = \frac {\int \left (2-2 \csc (c+d x)+\csc ^2(c+d x)-\frac {2}{1+\csc (c+d x)}\right ) \, dx}{a^2} \\ & = \frac {2 x}{a^2}+\frac {\int \csc ^2(c+d x) \, dx}{a^2}-\frac {2 \int \csc (c+d x) \, dx}{a^2}-\frac {2 \int \frac {1}{1+\csc (c+d x)} \, dx}{a^2} \\ & = \frac {2 x}{a^2}+\frac {2 \text {arctanh}(\cos (c+d x))}{a^2 d}-\frac {2 \cot (c+d x)}{a^2 d (1+\csc (c+d x))}+\frac {2 \int -1 \, dx}{a^2}-\frac {\text {Subst}(\int 1 \, dx,x,\cot (c+d x))}{a^2 d} \\ & = \frac {2 \text {arctanh}(\cos (c+d x))}{a^2 d}-\frac {\cot (c+d x)}{a^2 d}-\frac {2 \cot (c+d x)}{a^2 d (1+\csc (c+d x))} \\ \end{align*}
Leaf count is larger than twice the leaf count of optimal. \(216\) vs. \(2(54)=108\).
Time = 0.94 (sec) , antiderivative size = 216, normalized size of antiderivative = 4.00 \[ \int \frac {\cot ^2(c+d x)}{(a+a \sin (c+d x))^2} \, dx=-\frac {\csc \left (\frac {1}{2} (c+d x)\right ) \sec \left (\frac {1}{2} (c+d x)\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^3 \left (\cos \left (\frac {3}{2} (c+d x)\right ) \left (5+2 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-2 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )+\cos \left (\frac {1}{2} (c+d x)\right ) \left (-3-2 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+2 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )+2 \left (-2 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+2 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )+\cos (c+d x) \left (1-2 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+2 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )\right ) \sin \left (\frac {1}{2} (c+d x)\right )\right )}{4 a^2 d (1+\sin (c+d x))^2} \]
[In]
[Out]
Time = 0.32 (sec) , antiderivative size = 59, normalized size of antiderivative = 1.09
method | result | size |
derivativedivides | \(\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\frac {1}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}-4 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {8}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}}{2 d \,a^{2}}\) | \(59\) |
default | \(\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\frac {1}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}-4 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {8}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}}{2 d \,a^{2}}\) | \(59\) |
parallelrisch | \(\frac {\left (-4 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-4\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-\cot \left (\frac {d x}{2}+\frac {c}{2}\right )+10 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 d \,a^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}\) | \(80\) |
risch | \(-\frac {2 \left (-3+i {\mathrm e}^{i \left (d x +c \right )}+2 \,{\mathrm e}^{2 i \left (d x +c \right )}\right )}{\left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right ) \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) d \,a^{2}}+\frac {2 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{d \,a^{2}}-\frac {2 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{d \,a^{2}}\) | \(102\) |
norman | \(\frac {-\frac {7 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d a}-\frac {1}{2 a d}+\frac {\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )}{2 d a}-\frac {27 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d a}-\frac {15 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d a}}{a \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}-\frac {2 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d \,a^{2}}\) | \(131\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 160 vs. \(2 (54) = 108\).
Time = 0.30 (sec) , antiderivative size = 160, normalized size of antiderivative = 2.96 \[ \int \frac {\cot ^2(c+d x)}{(a+a \sin (c+d x))^2} \, dx=\frac {3 \, \cos \left (d x + c\right )^{2} + {\left (\cos \left (d x + c\right )^{2} - {\left (\cos \left (d x + c\right ) + 1\right )} \sin \left (d x + c\right ) - 1\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - {\left (\cos \left (d x + c\right )^{2} - {\left (\cos \left (d x + c\right ) + 1\right )} \sin \left (d x + c\right ) - 1\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + {\left (3 \, \cos \left (d x + c\right ) + 2\right )} \sin \left (d x + c\right ) + \cos \left (d x + c\right ) - 2}{a^{2} d \cos \left (d x + c\right )^{2} - a^{2} d - {\left (a^{2} d \cos \left (d x + c\right ) + a^{2} d\right )} \sin \left (d x + c\right )} \]
[In]
[Out]
\[ \int \frac {\cot ^2(c+d x)}{(a+a \sin (c+d x))^2} \, dx=\frac {\int \frac {\cos ^{2}{\left (c + d x \right )} \csc ^{2}{\left (c + d x \right )}}{\sin ^{2}{\left (c + d x \right )} + 2 \sin {\left (c + d x \right )} + 1}\, dx}{a^{2}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 116 vs. \(2 (54) = 108\).
Time = 0.21 (sec) , antiderivative size = 116, normalized size of antiderivative = 2.15 \[ \int \frac {\cot ^2(c+d x)}{(a+a \sin (c+d x))^2} \, dx=-\frac {\frac {\frac {9 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1}{\frac {a^{2} \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {a^{2} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}} + \frac {4 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{2}} - \frac {\sin \left (d x + c\right )}{a^{2} {\left (\cos \left (d x + c\right ) + 1\right )}}}{2 \, d} \]
[In]
[Out]
none
Time = 0.32 (sec) , antiderivative size = 90, normalized size of antiderivative = 1.67 \[ \int \frac {\cot ^2(c+d x)}{(a+a \sin (c+d x))^2} \, dx=-\frac {\frac {4 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right )}{a^{2}} - \frac {\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{2}} - \frac {2 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 7 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )} a^{2}}}{2 \, d} \]
[In]
[Out]
Time = 9.45 (sec) , antiderivative size = 87, normalized size of antiderivative = 1.61 \[ \int \frac {\cot ^2(c+d x)}{(a+a \sin (c+d x))^2} \, dx=\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,a^2\,d}-\frac {9\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1}{d\,\left (2\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}-\frac {2\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a^2\,d} \]
[In]
[Out]